Skip to content

Fix: Exit early from update_orthos() when orthos are off#1458

Merged
carsen-stringer merged 1 commit into
mainfrom
3d_ortho_fix
Jun 11, 2026
Merged

Fix: Exit early from update_orthos() when orthos are off#1458
carsen-stringer merged 1 commit into
mainfrom
3d_ortho_fix

Conversation

@mrariden

@mrariden mrariden commented May 22, 2026

Copy link
Copy Markdown
Collaborator

When the orthos were off in the 3d gui and update_orthos() was called, an error would occur because zmax was unset:

zrange = zmax - zmin
self.layer_ortho = [
np.zeros((self.Ly, zrange, 4), "uint8"),
np.zeros((zrange, self.Lx, 4), "uint8")

The fix is to return from update_orthos() early when the orthobtn is unchecked. I just added a guard clause and unindented the block in the first if statement.

  • Gui testing protocol
  • Tests passing

@mrariden mrariden changed the title return early when orthos are off Fix: Exit early from update_orthos() when orthos are off May 22, 2026
@mrariden mrariden marked this pull request as ready for review June 11, 2026 15:57
@carsen-stringer carsen-stringer merged commit 45897c6 into main Jun 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants